package com.yh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yh.bean.Meetingapply;
import com.yh.bean.Meetingmanage;
import com.yh.dao.MeetDao;

@Service("msi")
public class MeetServiceImpl implements MeetService{
	
		@Autowired
		private MeetDao md;
	
		//新增会议室
		@Override
		public int addmeeting(Meetingmanage mm) {
			int i=md.addmeeting(mm);
			return i;
		}
		
		//查询会议室
		@Override
		public List<Meetingmanage> querymeeting() {
				List<Meetingmanage> mlist=md.querymeeting();
				return mlist;
			}
		
		//修改会议室
		@Override
		public int updatemeeting(Meetingmanage mm) {
				int i=md.updatemeeting(mm);
				return i;
			}
		
		//删除会议室
		@Override
		public int delmeeting(String[] mm_id) {
			int i=md.delmeeting(mm_id);
			return i;
		}
	
		//查询可用会议室
		@Override
		public List<Meetingmanage> querymeetingtime(Meetingapply ma) {
			List<Meetingmanage> mlist=md.querymeetingtime(ma);
			return mlist;
		}

		
		//申请会议室
		@Override
		public int applymeeting(Meetingapply ma) {
			int i=md.applymeeting(ma);
			return i;
		}
		
		//修改会议室
		@Override
		public int checkmeeting(Meetingapply ma) {
				int i=md.checkmeeting(ma);
				return i;
			}
		
		//按条件查询申请的会议室
		@Override
		public List<Meetingapply> querymeetingapply(Meetingapply ma) {
			List<Meetingapply> malist=md.querymeetingapply(ma);
			return malist;
		}

		//删除预定会议室
		@Override
		public int delApply(int ma_id) {
			int i=md.delApply(ma_id);
			return i;
		}
	

}
